<?php 
	$form = $this->session->userdata('form');
?>

<!--box-->
<div class="box corner-all">
    <!--box header-->
    <div class="box-header grd-white color-silver-dark corner-top">
        <span><?php echo $form['name']?></span>
    </div><!--/box header-->
    <!--box body-->
    <div class="box-body">
    	<div class="row-fluid">
    	<form class="form-horizontal">
		    <?php 
		    	$fields = $form['fields'];
		    	foreach ($fields as $f) {
		    	?>
		    		<div class="control-group form-field-new" id="control-<?php echo $f['id']?>" onclick="editField('<?php echo $f['id'] ?>')">
			    		<label class="control-label" for="<?php echo $f['id']?>"><?php echo $f['label']?></label>
			       		<?php if($f['tipo'] == 1){ ?>
			       			<div class="controls">
				       			<input type="text" id="<?php echo $f['id'] ?>"/>
			       			</div>
			       		<?php } ?>
			       	</div>
			<?php
				}
    		?>
	    </form>
    	</div>
    </div><!--/box body-->
</div><!--/box-->